package com.itheima.demo3_继承的练习;

public class Test {
    public static void main(String[] args) {
        Student s = new Student();
        s.name = "张三";
        s.age = 19;
        System.out.println(s.name + "," + s.age);
        s.eat();
        s.sleep();
        System.out.println("----------");
        Teacher t = new Teacher();
        t.name = "李四";
        t.age = 30;
        t.salary = 666;
        System.out.println(t.name + "," + t.age + "," + t.salary);
        t.eat();
        t.sleep();
        t.Teach();
        System.out.println("----------");
        HeadTeacher ht = new HeadTeacher();
        ht.name = "王五";
        ht.age = 30;
        ht.salary = 999;
        System.out.println(ht.name + "," + ht.age + "," + ht.salary);
        ht.eat();
        ht.sleep();
        ht.manager();
    }
}
